Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Fix some DB connection tests #15503

Merged
merged 1 commit into from
Sep 19, 2016
Merged

[5.1] Fix some DB connection tests #15503

merged 1 commit into from
Sep 19, 2016

Conversation

nhowell
Copy link
Contributor

@nhowell nhowell commented Sep 19, 2016

testTransactionsDecrementedOnTransactionException() didn't actually test that the transaction level was decremented because the exception caused the test to end early.

testCantSwapPDOWithOpenTransaction() changed to use @expectedException annotation, as is the convention, instead of $this->setExpectedException(). Also, use $connection->setPdo(null) instead of $connection->disconnect() which aligns better with the intent of the test.

testTransactionsDecrementedOnTransactionException() didn't actually test
that the transaction level was decremented because the exception caused
the test to end early.

testCantSwapPDOWithOpenTransaction() changed to use @ExpectedException
annotation, as is the convention, instead of
$this->setExpectedException(). Also, use $connection->setPdo(null)
instead of $connection->disconnect() which aligns better with the intent
of the test.
@taylorotwell taylorotwell merged commit eff1791 into laravel:5.1 Sep 19, 2016
@nhowell nhowell deleted the fix-db-connection-tests branch September 19, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants